# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def navlink( pageName, controllerName )
  	link_to pageName, {:controller => controllerName}, 
  	:class =>	if (controller.controller_name == controllerName) 
  					then 'activeNavLink' 
  					else 'navLink' 
  				end
  end
  
  def subnav
    
    require 'rubygems'
    require 'simple-rss'
    require 'open-uri'
    txt = "levicul.us |lǝ‧vī‧<b>cū</b>‧lŭs|<br /> <p>1. <i>empty-headed, vain, silly</i></p><p>2. <i>"
    rss = SimpleRSS.parse open('http://twitter.com/statuses/user_timeline/5499972.rss')
    txt += rss.entries.first.title.gsub(/jmole: /, '') + "</i></p>"
    txt
  end
end
